<?php
/*	echo("<pre>");
	print_r($razdels);
	echo("</pre>");
*/
?>

<div id="sub-razdel">
<h2>Разделы:</h2>
<?php
	$i=0;
	$y=0;
	if (!empty($razdels)) {
	
	$fraz=$razdels['main'];
	
	foreach ($fraz as $raz) {
?>
	<div class="ritem">
		<div class="ico"><a href="/<?=FS_CMS?>/list/<?=$raz['rname']?>/"><img src="<?=$design_path;?>images/razdel/ico-<?=$raz['rname']?>.png"></a></div>
		<div class="link"><a href="/<?=FS_CMS?>/list/<?=$raz['rname']?>/"><?=$raz['name']?></a></div>
	</div>
<?php
	}//foreach
	}//if
?>
</div>

<div class="clearfix"></div>

<div id="sub-pages">
<h2>Страницы:</h2>
<?php
	$i=0;
	$y=0;
	if (!empty($razdels)) {
	
	$fraz=$razdels['pages'];
	
	foreach ($fraz as $raz) {
	
	//if ($raz['pname']=="question") $ico="ico-page.png";
	//else $ico="";
	
?>
	<div class="ritem">
		<div class="ico"><a id="test" href="/<?=FS_CMS?>/edit/<?=$raz['rname']?>/<?=$raz['pname']?>/"><img src="<?=$design_path;?>images/razdel/<?php if (!empty($ico)) echo $ico; else {?>ico-<?=$raz['pname']?>.png<? }//else?>"></a></div>
		<div class="link"><a href="/<?=FS_CMS?>/edit/<?=$raz['rname']?>/<?=$raz['pname']?>/"><?=$raz['name']?></a></div>
	</div>
<?php
	}//foreach
	}//if
?>
</div>

<div class="clearfix"></div>
<?php
if (!empty($razdels['config'])) {
?>
<div id="sub-config">
<h2>Настройки:</h2>
<?php
	$i=0;
	$y=0;
	
	
	$fraz=$razdels['config'];
	
	foreach ($fraz as $raz) {
?>
	<div class="ritem">
		<div class="ico"><a href="/<?=FS_CMS?>/<?=$raz['rname']?>/<?=$raz['pname']?>/"><img src="<?=$design_path;?>images/razdel/ico-<?=$raz['pname']?>.png"></a></div>
		<div class="link"><a href="/<?=FS_CMS?>/<?=$raz['rname']?>/<?=$raz['pname']?>/"><?=$raz['name']?></a></div>
	</div>
<?php
	}//foreach

?>
</div>
<?php
	}//if
?>